﻿using Command.Proxy;
using System;

namespace Command
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("Hello World!");
            Docment doc = new Docment();

            //配置命令
            BaseCommand baseCommand = new SaveCommand(doc);

            //命令的具体实现
            IHandle handle = new ExcuteHandle();
            baseCommand.SetHandle(handle);

            //命令的执行者
            BaseProxy baseProxy = new ExcuteProxy();
            baseProxy.SetCommand(baseCommand);
            baseProxy.Excuted();
            Console.ReadKey();
        }
    }
}
